﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Ext.Net;
using Ext.Net.Utilities;

namespace Itop.GpsCar.Web.CustomAdmin
{
    public partial class main : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
           
            if (!X.IsAjaxRequest)
            {               
                string text = @"Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed metus nibh, sodales a, porta at, vulputate eget, dui. Pellentesque ut nisl. Maecenas tortor turpis, interdum non, sodales non, iaculis ac, lacus. Vestibulum auctor, tortor quis iaculis malesuada, libero lectus bibendum purus, sit amet tincidunt quam turpis vel lacus. In pellentesque nisl non sem. Suspendisse nunc sem, pretium eget, cursus a, fringilla vel, urna.";

                this.ResourceManager1.RegisterClientScriptBlock("text", string.Format("var text=\"{0}\";", text));

                foreach (Portlet portlet in ControlUtils.FindControls<Portlet>(this.Page))
                {
                    if (!portlet.ID.Equals("Portlet1"))
                    {
                        portlet.Html = "={text}";
                        portlet.Padding = 5;
                    }
                }
               
            }

        }
        protected void MenuItem1_Click(object sender, DirectEventArgs e)
        {
            Tab1.Visible = true;
           
            Tab2.Visible = false;
        }
        protected void MenuItem2_Click(object sender, DirectEventArgs e)
        {
            Tab1.Visible = false;
            Tab2.Visible = true;
        }
    }
}
